﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infratructure
{
    public interface IRepository <T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">参数</param>
        /// <returns>影响行数</returns>
        Task<int> Addway(T t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t">参数</param>
        /// <returns>影响行数</returns>
        Task<int> Updateway(T t);
        /// <summary>
        /// 主键对应的一行数据
        /// </summary>
        /// <param name="Id">主键</param>
        /// <returns>数据</returns>
        Task<T> GetValue(long Id);
        /// <summary>
        /// 数据获取
        /// </summary>
        /// <returns>数据列表</returns>
        IQueryable<T> GetAll();
    }
}
